import { mapGetters } from "vuex";
import { totime } from "../../../utils.js";
export default {
  name: "watchannouncement",
  props: ["ID"],
  computed: {
    ...mapGetters([
      "getschooladdress",
      "getschoolstudent",
      "getschoolannouncementpush",
      "getschooluser",
      "getschooluserbyid"
    ]),
    data() {
      return this.getschoolannouncementpush.find(v => v.ID == this.ID);
    },
    user() {
      const { data, getschoolstudent } = this;
      const i = data.schoolannouncementpushstudent.map(v => v.schoolstudentid);
      return getschoolstudent
        .filter(v => i.includes(v.ID))
        .map(v => v.name)
        .join(" ");
    }
  },
  methods: {
    totime
  }
};